using namespace std;
template<class T>
class HasFuncFoo
{
    typedef char _One;
    typedef struct{char a[2];}_Two;
    template<class T,void (T::*)()>
    struct FuncMatcher;
    template<class T>     
    static _One hasFunc(FuncMatcher<T,&T::fooFunc>*);
    template<class T>     
    static _Two hasFunc(...);
public:
    static const int value=sizeof(hasFunc<T>(NULL))==sizeof(_One); 
};